package com.lwk.user;

import com.lwk.springframework.LwkApplicationContext;
import com.lwk.user.service.MemberService;
import com.lwk.user.service.UserService;

public class MyApplication {

    public static void main(String[] args) {
        // 非懒加载的单例bean,容器创建的时候回去创建bean
        LwkApplicationContext applicationContext = new LwkApplicationContext(AppConfig.class);
        // 懒加载的单例bean、原型bean使用的时候才去创建bean
//        UserService userService = (UserService)applicationContext.getBean("userService");
//        userService.test();

        MemberService memberService = (MemberService)applicationContext.getBean("memberService");
        memberService.test();
    }

}
